package com.pb.b2b.common.model;

import java.io.Serializable;

import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

public class BaseObject implements Serializable {
	public static final long serialVersionUID = 1L;

	private Long id;

	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE);
	}

	public boolean equals(Object obj) {
		boolean result = false;
		if (obj instanceof BaseObject) {
			BaseObject other = (BaseObject) obj;
			if (other.getId().equals(this.getId()))
				result = true;
		}
		return result;
	}

	public String toDebugString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.DEFAULT_STYLE);
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

}